<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default{
  methods:{
    getRoute(val){
      if(Object.keys(val.meta).length>0){
        let obj = {};
        obj.title = val.meta.title;
        obj.path = val.path;
        this.$store.dispatch("getAddTagsRoute",obj)
      }
    }
  },
  watch:{
    $route(val){
      // console.log(val);
      this.getRoute(val)
      if(val.path == "/home/echarts"){
        this.$store.dispatch("getSetTagIndex",0)
      }
    }
  }
}


</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
   height: 100%;
}
body,html{
  width: 100%;
  height: 100%;
  transition: all .3s, left .3s, width .3s, margin-left .3s, font-size .3s;  
}
*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
a{
  text-decoration: none;
}
li{
  list-style: none;
}
img{
  vertical-align: middle;
}
// #nav {
//   padding: 30px;

//   a {
//     font-weight: bold;
//     color: #2c3e50;

//     &.router-link-exact-active {
//       color: #42b983;
//     }
//   }
// }
</style>
